export function login(){
	      uni.login({
				success: res => {
					console.log(res)
					uni.request({
						url: '',
						method: "POST",
						header: {
						
						},
						data: {
							code: res.code
						},
						success: result => {
							console.log(result)
							uni.showToast({
								title: result.data.msg,
								icon: "none"
							})
							if(result.data.status =='success'){
								console.log(result.data.status)
								uni.reLaunch({
									url:'/pages/index/index'
								})
								uni.setStorageSync('token',result.data.token)
							}else{
								uni.login({
									success:res=>{
										uni.setStorageSync('code',res.code)
									}
								})
							}
						
						},
						fail: (err) => {
							
						}
					})
				}
			})
		}
